package com.satan.vote.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 *  实体类。
 *
 * @author Satan
 * @since 2023-08-10
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("tb_wxuserinfo")
public class WxUserInfo implements Serializable {
    @Id(keyType = KeyType.Auto)
    private Integer id;

    private String openid;
    @Column(value = "nick_name",onInsertValue = "'微信用户'")
    private String nickName;
    @Column(value = "avatar_url",onInsertValue = "'default.png'")
    private String avatarUrl;
    private LocalDateTime registerDate;

    private LocalDateTime lastLoginDate;
    @Column(value = "status",onInsertValue = "0")
    private String status;

}
